package org.test.designPattern.bridge;

import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * 一个策略
 * @author Administrator
 *
 */
public class User {

	private OutPutStrategy strategy;
	
	/**
	 * 构造方法，同时确定策略
	 * @param strategy1
	 */
	public User(OutPutStrategy strategy1){		
		
		this.strategy = strategy1;
	}
	
	public void outPut(String s) throws FileNotFoundException, IOException{
		
		strategy.outPut(s);
	}
}
